
#ifndef __MEDIA_PLAYER_PLAY_LIST_H_
#define __MEDIA_PLAYER_PLAY_LIST_H_
/*
typedef enum
{
	MUSIC_PLAY_LIST,
	IMAGE_PLAY_LIST,
	VIDEO_PLAY_LIST,
	MIXED_PLAY_LIST,
}PlayListType;
*/

typedef enum
{
	PLAY_LIST_SORT_RAND=0,
	PLAY_LIST_SORT_DATE,
	PLAY_LIST_SORT_SIZE,
}PlayListSortType;

typedef enum
{
	PLS_IDEL=0,
	PLS_MANAGEMENT,
	PLS_PLAY,
}PlayListState;
/*
typedef enum
{
	PLAY_LIST_REPEAT,
	PLAY_LIST_RAND,
	PLAY_LIST_ONE,
}PlayListLoopType;
*/
typedef enum{
	ME_NO=0,
	ME_POP,
	ME_CLASSIC,
}MusicEffectMode;

typedef enum{
	PE_NO=0,
	PE_LEFT_IN,
	PE_UP_IN,
}ImageEffectMode;

typedef struct
{
	char										name[32];	//playlist name
	unsigned short							playidx;	//which is playing now
	unsigned short							playednum;	//num that has been played
	PlayListLoopType							looptype;
	unsigned char								loopnum;
	unsigned short							filenum;	
	unsigned char								num_limit_enable; //if playlist is limited in num
	unsigned char								add_once;	//if support one file only be added once to playlist at one time
	unsigned short							limit_num;
	PlayListSortType							sorttype;
	unsigned char								sortorder;
	unsigned short							*looppicture;	//used for random play
	union
	{
		struct
		{
			MusicEffectMode		effectmode;	//music effect type
			unsigned char			resv;
			unsigned char			showtitle;	//mp3 show style
			unsigned char			showartist;
			unsigned int			resv1;
		}msc;
		
		struct
		{
			unsigned short	interval;
			unsigned short	scalemode;
			char				*bkg_music;	//backgroud music
		}pic;
	}ext;
}PlayListInfo, *pPlayListInfo;


typedef struct
{
	struct list_head			listpointer;
	FileType					type;	//item's file type, as F_MP3...
	char						name[0]; // full path, must locate at the end of this structure
} PlayListItem, *pPlayListItem;


typedef struct
{
	struct list_head			listpointer;
	PlayListType				type;	//playlist media type
	PlayListState				state;	//playlist state, it will be useful if need edit playlist while playing
	PlayListInfo				info;
	struct list_head			head;
}PlayList, *pPlayList;

typedef struct
{
	BOOL			id_check_playlist;
	PlayListSortType	mode;
}PlayListCompareContext, *pPlayListCompareContext;

#endif
